In modern telephony networks, media switching and call control functionality are separated. Call control, which includes setting up and tearing down calls and maintaining call state machines, is performed by a network entity referred to as a media gateway controller (MGC). Media stream switching, which includes switching media packets between input and output ports and converting the media packets into the appropriate formats for the sending and receiving parties, is performed by a media gateway (MG). Media gateway controllers communicate call control information to media gateways via a media gateway control protocol. Typical media gateway control protocols, such as MGCP and MEGACO, include commands for communicating information about each endpoint of a session to the media gateway and instructing the media gateway as to how to process packets to be delivered to each endpoint.
FIG. 1 is a schematic diagram illustrating voice sessions between media gateways 100, 102, 104, 106 interconnected through an IP network 108. Media gateways 100, 102, 104, and 106 may be connected through IP network 108 via multiple paths through a series of next-hop routers. Multiple bidirectional voice sessions may be set up between any two or more of media gateways 100, 102, 104, and 106. As voice packets are received at a media gateway (ingress packets) or exit the media gateway (egress packets), the particular session that a packet belongs to must be identified for proper delivery and/or processing of the packet. The process of assigning a packet to a particular session to which it belongs is referred to herein as packet classification.
FIG. 2 is a schematic diagram illustrating an exemplary media gateway 200. Referring to FIG. 2, media gateway 200 includes a control module 202, a resource manager 204, a packet switch fabric 206, voice servers 208, and network interfaces 210. Each voice server 208 contains voice processing resources for processing VoIP and TDM voice streams. For example, each voice server 208 may include codecs, VoIP, ATM, and TDM chips, and digital signal processing resources for processing VoIP streams. A detailed description of exemplary resources that may be found in voice server 208 can be found in commonly assigned, co-pending U.S. patent application Ser. No. 10/676,233, the disclosure of which is incorporated herein by reference in its entirety.
Voice servers 208 are each reachable through packet switch fabric 206 via any of network interfaces 210. Multiple sessions may be assigned to the same voice server 208. Each session is associated with a different IP address and user datagram protocol (UDP) port number combination. Put simply, UDP ports provide a software mechanism for distinguishing among multiple processes, such as voice sessions, executing on a single host, such as voice server 208. UDP operates at OSI Layer 4.
Control module 202 of media gateway 200 controls the overall operation of media gateway 200 and communicates with media gateway controller 212 to set up and tear down calls. Resource manager 204 of control module 202 allocates new voice sessions to incoming calls. For example, resource manager 204 may assign one of voice servers 208 to a session and store session information for the session in a session table 214 in a memory. Session table 214 is then regularly accessed to classify ingress and egress packets to the appropriate sessions. Although session table 214 is shown logically as a single entity, session tables 214 may actually be distributed among, and accessed by, network interfaces 210, or packet switch fabric 206, as will be discussed further below.
The memory used to store session tables 214 is typically a content addressable memory (CAM). A CAM is preferred because it provides reduced search time as compared to more conventional memory, such as RAM. Consequently, increased packet processing speeds can be realized by using CAM. Due to the automatic parallel search capability employed, a CAM can search its entire memory in a single operation. In short, a CAM can efficiently perform a search based on data content stored anywhere in its memory and without the need to know the particular address in memory of the stored data. There are, however, trade-offs associated with the use of CAM, such as increased expense and increased physical space requirements. Unlike RAM, which has simple storage cells, each individual memory in a CAM typically has its own embedded “match circuit” for allowing parallel searching of all cells simultaneously. In addition, the resulting outputs from the parallel searching of each cell require additional circuitry. This additional circuitry requirement increases the physical size of the content addressable memory chip, which exponentially adds to manufacturing cost. It is therefore advantageous to use content addressable memory efficiently.
Accordingly, a need exists for efficiently storing session information in a content addressable memory for use in packet classification.